{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=322
  Verdict: Accepted
}
uses SysUtils, Math;
 
type
	point=record
		x,y:longint;
	end;
 
var
	i,n,ans:longint;
	a:array[0..110] of point;
	cx,cur:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
fillchar(a,sizeof(a),0);
ans:=1;
cx:=0;
for i:=1 to n do begin
	read(a[i].x,a[i].y);
	cur:=a[i].x*a[i].x+a[i].y*a[i].y;
	if cur>cx then begin
		ans:=i;
		cx:=cur;
	end;	
end;
write(a[ans].x,' ',a[ans].y);
end.